<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>3140：[Hnoi2013]消毒</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Hnoi2013]消毒</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Hnoi2013]消毒</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                [Hnoi2013]消毒                </h1>
                <p>时间限制：10s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：128MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><p><span style="font-size: medium">最近在生物实验室工作的小T遇到了大麻烦。 <br />
由于实验室最近升级的缘故，他的分格实验皿是一个长方体,其尺寸为a*b*c，a、b、c 均为正整数。为了实验的方便，它被划分为a*b*c个单位立方体区域，每个单位立方体尺寸<br />
为1*1*1。用(i,j,k)标识一个单位立方体，1&nbsp;&le;i&le;a，1&le;j&le;b，1&le;k&le;c。这个实验皿已经很久没有人用了，现在，小T被导师要求将其中一些单位立方体区域进 行消毒操作（每个区域可以被重复消毒）。而由于严格的实验要求，他被要求使用一种特定 的F试剂来进行消毒。 这种F试剂特别奇怪，每次对尺寸为x*y*z的长方体区域（它由x*y*z个单位立方体组 成）进行消毒时，只需要使用min{x,y,z}单位的F试剂。F试剂的价格不菲，这可难倒了小 T。现在请你告诉他，最少要用多少单位的F试剂。(注：min{x,y,z}表示x、y、z中的最小 者。) <br />
</span></p></p><hr/><h3>输入格式</h3><p><div style="margin: 1.25pt 52.45pt 0pt 18pt; line-height: 15.5pt"><span style="font-size: medium"><span style="color: black">第一行是一个正整数</span><span style="color: black">D</span><span style="color: black">，表示数据组数。</span><span style="color: black">接下来是</span><span style="color: black">D</span><span style="color: black">组数据，每组数据开头是三个数</span><span style="color: black">a,b,c</span><span style="color: black">表示实验皿的尺寸。接下来会出现</span><span style="color: black">a</span><span style="color: black">个</span><span style="color: black">b </span><span style="color: black">行</span><span style="color: black">c</span><span style="color: black">列的用空格隔开的</span><span style="color: black">01</span><span style="color: black">矩阵，</span><span style="color: black">0</span><span style="color: black">表示对应的单位立方体不要求消毒，</span><span style="color: black">1</span><span style="color: black">表示对应的单位立方</span><span style="color: black">体需要消毒；例如，如果第</span><span style="color: black">1</span><span style="color: black">个</span><span style="color: black">01</span><span style="color: black">矩阵的第</span><span style="color: black">2</span><span style="color: black">行第</span><span style="color: black">3</span><span style="color: black">列为</span><span style="color: black">1</span><span style="color: black">，则表示单位立方体</span><span style="color: black">(1,2,3)</span><span style="color: black">需要被</span><span style="color: black">消毒。</span></span><span style="font-size: medium"><span style="color: black">输入保证满足</span><span style="color: black">a*b*c&le;5000,T&le;3</span><span style="color: black">。</span></span></div>
<p></p></p><hr/><h3>输出格式</h3><p><p class="MsoNormal" align="left" style="margin: 1.25pt 52.3pt 0pt 18pt; line-height: 15pt; text-align: left; mso-line-height-rule: exactly; mso-layout-grid-align: none"><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">仅包含</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman">D</font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">行，每行一个整数，表示对应实验皿最少要用多少单位</span><span style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman"> </font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">的</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman">F</font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">试剂。</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman"> <o:p></o:p></font></span></p></p><hr/><h3>样例输入</h3><pre>1                  
4  4 4
1  0 1 1
0  0 1 1
0  0 0 0
0  0 0 0
0  0 1 1
1  0 1 1
0  0 0 0
0  0 0 0
0  0 0 0
0  0 0 0
1  0 0 0
0  0 0 0
0  0 0 0
0  0 0 0
0  0 0 0
1  0 0 0
</pre><hr/><h3>样例输出</h3><pre>3</pre><hr/><h3>提示</h3><p><p class="MsoNormal" align="left" style="margin: 1.25pt -1.5pt 0pt 33.8pt; line-height: 12.75pt; text-align: left; mso-line-height-rule: exactly; mso-layout-grid-align: none"><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">对于区域</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman">(1,1,3)-(2,2,4)</font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">和</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman">(1,1,1)-(4,4,1)</font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">消毒，分别花费</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman">2</font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">个单位和</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman">1</font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">个单位的</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman">F</font></span><span style="font-size: 11pt; color: black; font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt">试剂。</span><span lang="EN-US" style="font-size: 11pt; color: black; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt"><font face="Times New Roman"> <o:p></o:p></font></span></p></p><hr/><h3>题目来源</h3><p>没有写明来源</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=3140" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=3140" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>